Optimal. Leaf size=112 \[ \frac {2 (b e-a f)^2}{f^2 (d e-c f) \sqrt {e+f x}}+\frac {2 b^2 \sqrt {e+f x}}{d f^2}-\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{3/2} (d e-c f)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {89, 65, 214}
\begin {gather*} -\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{3/2} (d e-c f)^{3/2}}+\frac {2 (b e-a f)^2}{f^2 \sqrt {e+f x} (d e-c f)}+\frac {2 b^2 \sqrt {e+f x}}{d f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 89
Rule 214
Rubi steps
\begin {align*} \int \frac {(a+b x)^2}{(c+d x) (e+f x)^{3/2}} \, dx &=\int \left (\frac {(-b e+a f)^2}{f (-d e+c f) (e+f x)^{3/2}}+\frac {b^2}{d f \sqrt {e+f x}}+\frac {(-b c+a d)^2}{d (d e-c f) (c+d x) \sqrt {e+f x}}\right ) \, dx\\ &=\frac {2 (b e-a f)^2}{f^2 (d e-c f) \sqrt {e+f x}}+\frac {2 b^2 \sqrt {e+f x}}{d f^2}+\frac {(b c-a d)^2 \int \frac {1}{(c+d x) \sqrt {e+f x}} \, dx}{d (d e-c f)}\\ &=\frac {2 (b e-a f)^2}{f^2 (d e-c f) \sqrt {e+f x}}+\frac {2 b^2 \sqrt {e+f x}}{d f^2}+\frac {\left (2 (b c-a d)^2\right ) \text {Subst}\left (\int \frac {1}{c-\frac {d e}{f}+\frac {d x^2}{f}} \, dx,x,\sqrt {e+f x}\right )}{d f (d e-c f)}\\ &=\frac {2 (b e-a f)^2}{f^2 (d e-c f) \sqrt {e+f x}}+\frac {2 b^2 \sqrt {e+f x}}{d f^2}-\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{3/2} (d e-c f)^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 126, normalized size = 1.12 \begin {gather*} \frac {4 a b d e f-2 a^2 d f^2+b^2 (2 c f (e+f x)-2 d e (2 e+f x))}{d f^2 (-d e+c f) \sqrt {e+f x}}-\frac {2 (b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )}{d^{3/2} (-d e+c f)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 134, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {\frac {2 b^{2} \sqrt {f x +e}}{d}-\frac {2 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}{\left (c f -d e \right ) \sqrt {f x +e}}-\frac {2 f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (c f -d e \right ) d \sqrt {\left (c f -d e \right ) d}}}{f^{2}}\) | \(134\) |
default | \(\frac {\frac {2 b^{2} \sqrt {f x +e}}{d}-\frac {2 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}{\left (c f -d e \right ) \sqrt {f x +e}}-\frac {2 f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (c f -d e \right ) d \sqrt {\left (c f -d e \right ) d}}}{f^{2}}\) | \(134\) |
risch | \(\frac {2 b^{2} \sqrt {f x +e}}{d \,f^{2}}-\frac {2 a^{2}}{\left (c f -d e \right ) \sqrt {f x +e}}+\frac {4 a b e}{f \left (c f -d e \right ) \sqrt {f x +e}}-\frac {2 b^{2} e^{2}}{f^{2} \left (c f -d e \right ) \sqrt {f x +e}}-\frac {2 d \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right ) a^{2}}{\left (c f -d e \right ) \sqrt {\left (c f -d e \right ) d}}+\frac {4 \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right ) a b c}{\left (c f -d e \right ) \sqrt {\left (c f -d e \right ) d}}-\frac {2 \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right ) b^{2} c^{2}}{d \left (c f -d e \right ) \sqrt {\left (c f -d e \right ) d}}\) | \(249\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 301 vs.
\(2 (105) = 210\).
time = 1.00, size = 615, normalized size = 5.49 \begin {gather*} \left [\frac {{\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{3} x + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{2} e\right )} \sqrt {-c d f + d^{2} e} \log \left (\frac {d f x - c f + 2 \, d e - 2 \, \sqrt {-c d f + d^{2} e} \sqrt {f x + e}}{d x + c}\right ) + 2 \, {\left (b^{2} c^{2} d f^{3} x - a^{2} c d^{2} f^{3} + 2 \, b^{2} d^{3} e^{3} + {\left (b^{2} d^{3} f x - {\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} f\right )} e^{2} - {\left (2 \, b^{2} c d^{2} f^{2} x - {\left (b^{2} c^{2} d + 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{2}\right )} e\right )} \sqrt {f x + e}}{c^{2} d^{2} f^{5} x + d^{4} f^{2} e^{3} + {\left (d^{4} f^{3} x - 2 \, c d^{3} f^{3}\right )} e^{2} - {\left (2 \, c d^{3} f^{4} x - c^{2} d^{2} f^{4}\right )} e}, \frac {2 \, {\left ({\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{3} x + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{2} e\right )} \sqrt {c d f - d^{2} e} \arctan \left (\frac {\sqrt {c d f - d^{2} e} \sqrt {f x + e}}{d f x + d e}\right ) + {\left (b^{2} c^{2} d f^{3} x - a^{2} c d^{2} f^{3} + 2 \, b^{2} d^{3} e^{3} + {\left (b^{2} d^{3} f x - {\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} f\right )} e^{2} - {\left (2 \, b^{2} c d^{2} f^{2} x - {\left (b^{2} c^{2} d + 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{2}\right )} e\right )} \sqrt {f x + e}\right )}}{c^{2} d^{2} f^{5} x + d^{4} f^{2} e^{3} + {\left (d^{4} f^{3} x - 2 \, c d^{3} f^{3}\right )} e^{2} - {\left (2 \, c d^{3} f^{4} x - c^{2} d^{2} f^{4}\right )} e}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 31.88, size = 100, normalized size = 0.89 \begin {gather*} \frac {2 b^{2} \sqrt {e + f x}}{d f^{2}} - \frac {2 \left (a f - b e\right )^{2}}{f^{2} \sqrt {e + f x} \left (c f - d e\right )} - \frac {2 \left (a d - b c\right )^{2} \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {c f - d e}{d}}} \right )}}{d^{2} \sqrt {\frac {c f - d e}{d}} \left (c f - d e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 129, normalized size = 1.15 \begin {gather*} -\frac {2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {c d f - d^{2} e}}\right )}{{\left (c d f - d^{2} e\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (a^{2} f^{2} - 2 \, a b f e + b^{2} e^{2}\right )}}{{\left (c f^{3} - d f^{2} e\right )} \sqrt {f x + e}} + \frac {2 \, \sqrt {f x + e} b^{2}}{d f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.30, size = 162, normalized size = 1.45 \begin {gather*} \frac {2\,b^2\,\sqrt {e+f\,x}}{d\,f^2}+\frac {2\,\mathrm {atan}\left (\frac {2\,\sqrt {e+f\,x}\,\left (d^2\,e-c\,d\,f\right )\,{\left (a\,d-b\,c\right )}^2}{\sqrt {d}\,{\left (c\,f-d\,e\right )}^{3/2}\,\left (2\,a^2\,d^2-4\,a\,b\,c\,d+2\,b^2\,c^2\right )}\right )\,{\left (a\,d-b\,c\right )}^2}{d^{3/2}\,{\left (c\,f-d\,e\right )}^{3/2}}-\frac {2\,\left (d\,a^2\,f^2-2\,d\,a\,b\,e\,f+d\,b^2\,e^2\right )}{d\,f^2\,\sqrt {e+f\,x}\,\left (c\,f-d\,e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________